<style>
    #imgbox{
        margin: 20px auto;
        width:100px;
        height:100px;
        background-size: cover;
        <? if(!empty($editUserInfo[4])){ ?>
            background-image:url(../../uploads/userpic/<?=$editUserInfo[4] ?>);
        <?}else{ ?>
            background-image:url(../../static/image/addpic.png);
        <?} ?>
    }
    #imgbox:hover{
        background-image:url(../../static/image/addpic.png);
    }
    #editupic{
        cursor:pointer;
        width:100px;
        height:100px;
        opacity:0;
    }
</style>
<div class="row">
    <div class="colxl-12 col-lg-12 col-md-12 col-sm-12 col-12">
        <div class="page-title-wrapper">
            <div class="page-title-box">
                <h4 class="page-title bold">修改用户信息</h4>
            </div>
            <div class="breadcrumb-list">
                <ul>
                    <li class="breadcrumb-link">
                        <a href="../public/userList.php?pagenow=<?=$_SESSION['userListPageNow']?>&searchvalue=<?=$_SESSION['userListSearchvalue']?>"><i class="fas fa-user-friends mr-2"></i>用户管理</a>
                    </li>
                    <li class="breadcrumb-link active"><i class="fas fa-user-edit mr-2"></i>修改用户信息</li>
                </ul>
            </div>
        </div>
    </div>
</div>
<!-- Products view Start -->
<?=editUserShowTips($_SESSION['editUserShowTips'],$_SESSION['editUsertipsType']); ?>
<div class="row">
    <div class="offset-xl-1 col-xl-10">
        <div class="card"><grammarly-extension data-grammarly-shadow-root="true" style="position: absolute; top: 0px; left: 0px; pointer-events: none;" class="cGcvT"></grammarly-extension>
            <div class="card-header">
                <h4 class="card-title mb-0">修改用户信息</h4>
            </div>
            <div class="card-body">
                <form action="./edituser.php?action=edituser" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="editoldusalt" value="<?=$editUserInfo[7] ?>" />
                    <input type="hidden" name="editoldupwd" value="<?=$editUserInfo[2] ?>" />
                    <input type="hidden" name="editoldupic" value="<?=$editUserInfo[4] ?>" />
                    <input type="hidden" name="editolduid" value="<?=$editUserInfo[0] ?>" />
                    <div class="row">
                        <div class="col-md-2 text-center">
                            <div class="media ad-profile2-img">
                                <div id="imgbox">
                                    <input type="file" name="editotherupic" id="editupic" onchange="browseUploadImg(this)"  accept="image/*" >
                                </div>
                            </div>
                            <label class="form-label font-weight-bold">点击修改当前头像</label>
                        </div>
                        <div class="col-md-5">
                            <div class="row">
                                <div class="col-md-12 mt-2 mb-2">
                                    <label class="form-label font-weight-bold">学号/工号</label>
                                    <input class="form-control" placeholder="非必要请勿修改(8位纯数字)" maxlength="8" value="<?=$editUserInfo[0] ?>" name="edituid">
                                </div>
                                <div class="col-md-12 mt-2 mb-2">
                                    <label class="form-label font-weight-bold ">用户名</label>
                                    <input class="form-control" placeholder="请输入新用户 姓名(2~16位，只允许汉字，英文字母，数字，下划线)" value="<?=$editUserInfo[1] ?>"  name="edituname">
                                </div>
                                <div class="col-md-12 mt-2 mb-2">
                                    <label class="form-label font-weight-bold">新密码</label>
                                    <input class="form-control" type="password" placeholder="请输入新密码(6~16位，只允许英文字母，数字，下划线；不填不更改密码)" name="editupwd">
                                </div>
                                <div class="col-md-12 mt-2 mb-2">
                                    <label class="form-label font-weight-bold">确认新密码</label>
                                    <input class="form-control" type="password" placeholder="请再次输入新密码(不更改密码无须确认)" name="editcomupwd">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-5">
                            <div class="row">
                                <div class="col-md-6 mt-2 mb-2">
                                    <label class="form-label font-weight-bold">性别</label>
                                    <select class="form-control btn-square" name="editusex">
                                        <?=sexSelect($sexArray,usexTurn($editUserInfo[3])) ?>
                                    </select>
                                </div>
                                <div class="col-md-6 mt-2 mb-2">
                                    <label class="form-label font-weight-bold">等级</label>
                                    <?if($editUserInfo[6]==5){ ?>
                                    <input class="form-control disabled" placeholder="封禁中" disabled value="" >
                                    <input type="hidden" value="<?=$editUserInfo[6]?>" name="edituiden">
                                    <?}else{?>
                                    <select class="form-control btn-square" name="edituiden">
                                        <?=sexSelect($idenArray,uidenTurn($editUserInfo[6])) ?>
                                    </select>
                                    <?}?>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12 mt-2 mb-2">
                                    <label class="form-label font-weight-bold">简介</label>
                                    <textarea class="form-control" rows="10" maxlength="200" placeholder="请输入新简介(限200字)" spellcheck="false" name="editudesc"><?=$editUserInfo[5] ?></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-footer text-right">
                        <input type="submit" class="btn btn-primary squer-btn" value="修 改" >
                        <input type="reset" class="btn btn-light squer-btn" onclick="cleanbrowseUploadImg(1)" value="重 置" >
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>